package com.wzx.studyspringboot.dao;

import com.wzx.studyspringboot.domain.Product;
import com.wzx.studyspringboot.mapper.ProductMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @ClassName ProductDao
 * @Description TODO
 * @Author wuzhixuan
 * @Date 2018/12/28 17:44
 * @Version 1.0
 */
@Service
public class ProductDao {

    @Autowired
    ProductMapper productMapper;

    public Product findProductById(Long id){
        return productMapper.findProductById(id);
    }
    public void saveProduct(Product product){
         productMapper.saveProduct(product);
    }

    public void deleteProduct(Long id){
         productMapper.deleteProduct(id);
    }
}
